package com.hp.modules.sys.dto;

import com.hp.common.base.YesNoEnum;
import com.hp.common.validator.Groups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(description = "上传配置")
public class SysUploadConfigParam {

    @ApiModelProperty(value = "主键-更新时必填")
    @NotNull(message = "主键不能为空",groups = {Groups.Update.class})
    private Long id;
    @ApiModelProperty(value = "业务类型",required = true)
    @NotBlank(message = "业务类型不能为空",groups = {Groups.Save.class,Groups.Update.class})
    private String biztype;
    @ApiModelProperty(value = "限定上传文件大小最小值，单位`byte`。（0为不限制）",required=false)
    private Long fileSizeMin;
    @ApiModelProperty(value = "限定上传文件大小最大值，单位`byte`。（0为不限制）",required=false)
    private Long fileSizeMax;
    @ApiModelProperty(value = "限定用户上传后辍(多个逗号分割)",required=true)
    @NotBlank(message="限定用户上传后辍(多个逗号分割)不能为空",groups={Groups.Save.class,Groups.Update.class})
    private String fileExt;
    @ApiModelProperty(value = "访问地址前辍",required=false)
    private String baseUrl;
    @ApiModelProperty(value = "回调地址",required=false)
    private String callbackUrl;
    @ApiModelProperty(value = "命名策略",required=true)
    @NotBlank(message="命名策略不能为空",groups={Groups.Save.class,Groups.Update.class})
    private String namingStrategy;
    @ApiModelProperty(value = "是否记录(1->不记录|NO,2->记录|YES)",required=true)
    private YesNoEnum isRecord;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBiztype() {
        return biztype;
    }

    public void setBiztype(String biztype) {
        this.biztype = biztype;
    }

    public Long getFileSizeMin() {
        return fileSizeMin;
    }

    public void setFileSizeMin(Long fileSizeMin) {
        this.fileSizeMin = fileSizeMin;
    }

    public Long getFileSizeMax() {
        return fileSizeMax;
    }

    public void setFileSizeMax(Long fileSizeMax) {
        this.fileSizeMax = fileSizeMax;
    }

    public String getFileExt() {
        return fileExt;
    }

    public void setFileExt(String fileExt) {
        this.fileExt = fileExt;
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    public String getNamingStrategy() {
        return namingStrategy;
    }

    public void setNamingStrategy(String namingStrategy) {
        this.namingStrategy = namingStrategy;
    }

    public YesNoEnum getIsRecord() {
        return isRecord;
    }

    public void setIsRecord(YesNoEnum isRecord) {
        this.isRecord = isRecord;
    }
}
